package pers.wensheng.patterns.creator_pattern.factory_pattern.static_factory_mode;

import pers.wensheng.patterns.creator_pattern.factory_pattern.static_factory_mode.entity.Coffee;

/**
 *  静态工厂模式
 *  简单工厂模式与静态工厂模式一样，都违背了开闭原则，要想增加商品都要修改工厂对象里面的代码
 */
public class Main {
    public static void main(String[] args) {
        CoffeeStore coffeeStore = new CoffeeStore();
        Coffee coffee = coffeeStore.orderCoffee("latte");
        System.out.println(coffee.getName());
    }
}
